package com.nf;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestGirl {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");

        Girl girl = (Girl)ac.getBean("g1");
        girl.吃饭();

        System.out.println(girl.getName()+","+girl.getAge());

        ((ClassPathXmlApplicationContext)ac).close();
    }
}
